<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/10/29
 * Time: 9:51
 */

namespace app\api\controller\v1;


use app\lib\exception\NotFoundException;
use think\Controller;
use app\api\model\Category as CategoryModel;

class Category extends Controller
{

    public function getAllCategory(){
        $categories = CategoryModel::all([],'img');
        if(!$categories){
            throw new NotFoundException();
        }
        return $categories;
    }

}